package com.etung.iot.demo.runner;

import com.etung.iot.demo.mqtt.EmqxClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class EmqxTaskRunner implements Runnable {

    @Autowired
    private EmqxClient emqxClient;

    @Override
    public void run() {
        log.info("emqxRunner -------Thread:" + Thread.currentThread().getName());
        log.info("start connect mqtt broker...");
        emqxClient.connect();
    }
}
